import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
import Page6 from './views/nav3/Page6.vue'
import echarts from './views/charts/echarts.vue'
import Department from "./views/org/Department";
import Employee from "./views/org/Employee";
import SystemDictionaryDetail from "./views/org/SystemDictionaryDetail";
import SystemDictionaryType from "./views/org/SystemDictionaryType";
import ContractInformation from "./views/org/ContractInformation";
import HousingInformation from "./views/org/HousingInformation";
import RentingInformation from "./views/org/RentingInformation";
import ShopRegister from "./views/ShopRegister";
import Shop from "./views/org/Shop";
import RegisterAgain from "./views/org/RegisterAgain";
import Nurse from "./views/org/Nurse";
import Bed from "./views/org/Bed";
import Oldman from "./views/org/Oldman";
import House from "./views/org/House";
import Owner from "./views/org/Owner";

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },{
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        leaf: true,
        children: [
            { path: '/echarts', component: echarts, name: 'echarts' }
        ],redirect: '/echarts'
    },{
        path: '/shopRegister',
        component: ShopRegister,
        name: 'ShopRegister',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/department', component: Department, name: '部门管理' },
            { path: '/employee', component: Employee, name: '员工管理' },
            { path: '/shop', component: Shop, name: '店铺管理' },

            ]
    },{
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/type', component: SystemDictionaryType, name: '数据字典类型管理' },
            { path: '/detail', component: SystemDictionaryDetail, name: '数据字典明细管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '链家系统',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/contract', component: ContractInformation, name: '房屋租赁合同' },
            { path: '/housing', component: HousingInformation, name: '房屋信息' },
            { path: '/renting', component: RentingInformation, name: '退租信息' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '店铺重新入住',
        iconCls: 'fa fa-address-card',
        leaf: true,//只有一个节点
        children: [
            { path: '/registerAgain', component: RegisterAgain, name: '店铺重新入住' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '养老院系统',
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/nurse', component: Nurse, name: '护工管理' },
            { path: '/bed', component: Bed, name: '床位管理' },
            { path: '/oldman', component: Oldman, name: '老人管理' },
        ]
    },{
        path: '/',
        component: Home,
        name: '小区业主系统',
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/house', component: House, name: '房屋管理' },
            { path: '/owner', component: Owner, name: '业主管理' },

        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;